/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.persistencia.domain;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author kenny
 */
@Embeddable
public class ClasexclasePK implements Serializable {
    @Basic(optional = false)
    @Column(name = "nClsId1")
    private int nClsId1;
    @Basic(optional = false)
    @Column(name = "nClsId2")
    private int nClsId2;

    public ClasexclasePK() {
    }

    public ClasexclasePK(int nClsId1, int nClsId2) {
        this.nClsId1 = nClsId1;
        this.nClsId2 = nClsId2;
    }

    public int getNClsId1() {
        return nClsId1;
    }

    public void setNClsId1(int nClsId1) {
        this.nClsId1 = nClsId1;
    }

    public int getNClsId2() {
        return nClsId2;
    }

    public void setNClsId2(int nClsId2) {
        this.nClsId2 = nClsId2;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) nClsId1;
        hash += (int) nClsId2;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ClasexclasePK)) {
            return false;
        }
        ClasexclasePK other = (ClasexclasePK) object;
        if (this.nClsId1 != other.nClsId1) {
            return false;
        }
        if (this.nClsId2 != other.nClsId2) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.persistencia.domain.ClasexclasePK[ nClsId1=" + nClsId1 + ", nClsId2=" + nClsId2 + " ]";
    }
    
}
